package com.study.entities;

import java.util.Date;

/**
 * @program: java-study-of-learner
 * @description: 雇佣者
 * @author: future
 * @create: 2020-10-20 19:53
 **/
public class Employee {
    private final static double PI = 3.14157;
    private int id;
    private String name;
    private double salary;
    private Date hireDay;
    //重写相等方法
    public boolean equals(Object otherObject) {
        if(this == otherObject){
            return true;
        }
        if(otherObject==null){
            return false;
        }
        if(getClass()!=otherObject.getClass()){
            return false;
        }
        Employee other =(Employee) otherObject;
        return name.equals(other.name)&&salary==other.salary&&hireDay.equals(other.hireDay);

    }

    public static void main(String[] args) {

    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

}
